package com.redstar.study;

import com.actionbarsherlock.app.SherlockActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.deaux.fan.FanView;

public class MainScreen extends SherlockActivity{
	
	private OnClickListener ButtonListener;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		getSupportActionBar().setDisplayShowHomeEnabled(false);
		getSupportActionBar().setTitle("Japanese Study Practice");
		
		Button practiceButton = (Button) findViewById(R.id.PracticeButton);
		Button quizButton = (Button) findViewById(R.id.QuizButton);
		Button dictionaryButton = (Button) findViewById(R.id.DictionaryButton);

		ButtonListener = new OnClickListener(){
			public void onClick(View v) {	
				
				Button B = (Button) v;
				Intent i;
				
				switch (B.getId()) {
				case R.id.PracticeButton:
					i = new Intent(MainScreen.this, Practice.class);
					break;
				case R.id.QuizButton:
					i = new Intent(MainScreen.this, Quiz.class);
					break;
				case R.id.DictionaryButton:
					i = new Intent(MainScreen.this, Dictionary.class);
					break;
				default:
					i = new Intent();
				}
				MainScreen.this.startActivity(i);
				
			}
		};		
		
		practiceButton.setOnClickListener(ButtonListener);
		quizButton.setOnClickListener(ButtonListener);
		dictionaryButton.setOnClickListener(ButtonListener);		

	}
	



}
